<template>
  <div class="nav-bar">
    <nav-item v-for="(item,index) in fieldData" :key="index"
              :item="item"
              :index="index"
              :curInd="curInd"
              @clickNavItem="clickNavItem"
    ></nav-item>
  </div>
</template>

<script>
  import NavItem from './NavItem';
  export default {
      name:"NavBar",
      props:{
          fieldData:Array,
          curInd:Number
      },
      components:{NavItem},
      data(){
          return{}
      },
      methods:{
          clickNavItem(e){
              this.$emit("clickNavItem",e)
          }
      }
  }
</script>

<style scoped>
  .nav-bar{
    height: 30px;
    line-height: 30px;
    margin: 20px auto;
    background-color:#eee;
  }
</style>
